/**
 * @File   : layout.tsx
 * @Author : xue.xiaoBing
 * @Date   : 2024/3/22 14:46
 * @Desc   : 顶部轮播图
 * */
import {Swiper} from "@nutui/nutui-react-taro";

const list = [
  'https://storage.360buyimg.com/jdc-article/NutUItaro34.jpg',
  'https://storage.360buyimg.com/jdc-article/NutUItaro2.jpg',
  'https://storage.360buyimg.com/jdc-article/welcomenutui.jpg',
  'https://storage.360buyimg.com/jdc-article/fristfabu.jpg'
]

const TopSwiper = () => {
  return (
    <Swiper indicator defaultValue={0}>
      {list.map((item, index) => {
        return (
          <Swiper.Item key={item}>
            <img width='100%' height='100%' src={item} onClick={() => console.log(index)} alt='' />
          </Swiper.Item>
        )
      })}
    </Swiper>
  )
}

export default TopSwiper;
